import store from '@/store/index'
import * as mutationsTypes from '@/store/mutations-types'

//登录注册的路由
export default [
  {
    path: '/cinema',
    name: 'cinema',
    component: () => import('@/views/cinema/Cinema'),
    beforeEnter: (to, from, next) => {
      console.log('从哪儿来: ' + from.path)
      console.log('到哪儿去: ' + to.path)
      window.document.title = '影院'
      store.commit(mutationsTypes.EXCHANGE_HOME_NAV_ACTIVE_INDEX, '3')
      next()
    }
  },
  {
    path: '/cinemaInfo',
    name: 'cinemaInfo',
    component: () => import('@/views/cinema/cinema_info/CinemaInfo'),
    beforeEnter: (to, from, next) => {
      console.log('从哪儿来: ' + from.path)
      console.log('到哪儿去: ' + to.path)
      window.document.title = '影院信息'
      store.commit(mutationsTypes.EXCHANGE_HOME_NAV_ACTIVE_INDEX, '3')
      next()
    }
  },
]
